<?php $url = new Url();?>
<div id="main" class="nosidebar">    

    <div id="content">
        
        <h2><?php echo $data_project['project_name']; ?></h2>

        <div class="splitcontentleft">
            <div class="wiki">
                <p><?php echo $data_project['project_description']; ?></p>
                <ul>
                    <li>Trang chủ: <a href="<?php echo $data_project['project_homepage']; ?>"><?php echo $data_project['project_homepage']; ?></a></li>
                    <li>Công ty: <a href=""><?php echo $data_project['project_company']; ?></a></li>
                    <li>Khách hàng: <a href=""><?php echo $data_project['project_customer']; ?></a></li>
                    <li>Ngày bắt đầu dự án: <a href="javascript:"><?php echo date('d/m/Y',$data_project['project_start_date']); ?></a></li>
                    <li>Ngày dự kiến kết thúc dự án: <a href="javascript:"><?php echo date('d/m/Y',$data_project['project_end_date']); ?></a></li>
                    <li>Ngân sách dự án: <a href="javascript:"><?php echo number_format($data_project['project_budget'],0); ?></a></li>
                    <li>Ngân sách còn lại: <a href="javascript:"><?php echo number_format($data_project['project_remain']); ?></a></li>
                </ul>                
            </div>                        

        </div>

        <div class="splitcontentright">
            <div class="members box">
                <h3>Thành viên</h3>
                <p>                    
                    Quản lý dự án: <a href="<?php echo $url->createUrl("user/detail",array("user_id"=>$data_project['project_admin_id'])); ?>"><?php echo $data_project['fullname']; ?></a><br>                                        
                    Thành viên: <?php for($i=0;$i<count($data_member);$i++){ ?> <a href="<?php echo $url->createUrl("user/detail",array("user_id"=>$data_member[$i]['user_id'])); ?>"><?php echo $data_member[$i]['fullname']; ?></a>, <?php } ?><br>
                </p>
            </div>
        </div>
        <div style="clear:both;"></div>
        <div style="width: 50%;margin: 0px auto;padding-top: 30px;">            
            <img style="max-width: 400px;max-height: 400px;" src="<?=Yii::app()->params["urlImage"].$data_project['project_image']; ?>" />
        </div>
    </div>

</div>

<script type="">

    function change_status_project(status){
        if(confirm('Bạn có chắc chắn muốn thay đổi trạng thái dự án?')){
            var strUrl = '<?=$url->createUrl("project/ajaxUpdateStatusProject") ?>';            
            loadingAjax();
            $.ajax({
                type: "GET",
                url: strUrl,
                data: {status:status},
                success: function(msg){                            
                    if(msg==1){                       
                        //$('#role_row_'+role_id).hide('slow');
                        location.reload();
                    }
                }
            });

            closeLoadingAjax();            
        }
    }

</script>
